<style>
.shine {color:#f60}
.fe-floatright-bottom {bottom:2.6rem}
.noread{
				height:8rem;
				overflow-y:hidden
}
.noread-btn {position: relative;padding-top:0.3rem;}
.noread-btn .exp-mask {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 2rem;
				background-image: linear-gradient(-180deg,rgba(255,255,255,0) 13%,#fff 63%);
}
.fui-picture .image .playbtn {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
	padding-top:4rem;
    text-align: center;
    color: #fff;
}
.live-living {
    height: 1rem;
    display: inline-block;
    border: 0 solid #ededed;
    -webkit-border-radius: 1rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.8) none repeat scroll 0 0;
    color: #fff;
    line-height: 0.9rem;
    font-size: 0.6rem;
    position: absolute;
    opacity: 0.8;
    padding: 0 0.5rem;
    left: 0.15rem;
    bottom: 0.3rem;
    z-index: 10;
}
.live-title {
    height: 1rem;
    display: inline-block;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.8) none repeat scroll 0 0;
    color: #fff;
    line-height: 0.9rem;
    font-size: 0.6rem;
    position: absolute;
    opacity: 0.8;
    padding: 0 0.5rem;
    top: 0;
    z-index: 10;
}
.live-living i{
	position: relative;
	width:1.05rem;
	height:1.05rem;
	display: inline-block;
	background: url("../addons/jy_weishop/resource/images/live-living.gif") no-repeat center;
	background-size: contain;
	-webkit-border-radius: 1rem;
	border-radius: 1rem;
	top: -1px;
	left: -1px;
	margin:0 0.1rem 0 0;
	margin-left:-0.55rem;
}
.live-hot-list-img img{width:100%;height:5.5rem;}
.fe-floatright-bottom a{
    background-color: rgba(0,0,0,0.2);
}
.followpiaofu img{width: 0px;position: fixed; bottom: 260px; right: 25px;z-index:188}
.jylabel-success {
    border: 1px solid #5cb85c;
	background-color: #5cb85c;
    color: #fff;
}
</style>
<div class="fui-page order-create-page fui-page-current">
	<div class="fui-content">
		<div class="fui-cell-group" style="padding-bottom:0.3rem;margin-top:0">
			<div class="fui-cell sm">
				<div class="fui-cell-icon" style="font-size:1rem;width:1.2rem">
					<img style="width:1.1rem;height:1.1rem" ng-src="{{tomedia(pagedata.jie.image) || '../core/resource/images/noavatar.gif'}}">
				</div>
				<div class="fui-cell-text overflow-h">{{pagedata.jie.title || '在线教学'}}</div>
				<div class="fui-cell-remark noremark" style="font-size:1rem">
					<i class="icon icon-fenxiang2" onclick="$('#showsharecover').modal();" style="font-size: 0.85rem;margin-right:0.2rem"></i>
					<i class="icon icon-wo1" ng-click="access_json('jy_xiaoemerch/home/')" style="font-size: 0.9rem;"></i>
				</div>
			</div>
		</div>
		<div ng-if="pagedata.item.noread || !pagedata.item.videourl || pagedata.item.type==1 || pagedata.item.type==2" class="fui-picture">
				<div class="image" style="position: relative;display: block;" data-nocache="true">
					<img ng-src="{{tomedia(pagedata.item.image) || '../core/resource/images/nopic.jpg'}}" style="width:100%;max-height:12rem">
					<div ng-if="pagedata.item.noread" class="playbtn">
						<div ng-if="pagedata.item.type!=2">
							<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'noread_id':pagedata.item.noread_id,'noread_type':pagedata.item.noread_type},'jy_xiaoemerch/video_detail/pay/','jy_xiaoemerch/video_jieitem//id='+pagedata.item.id)" class="jylabel jylabel-success">点击付费(￥{{pagedata.item.price}})</a>
							<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="jylabel jylabel-success">点击付费(￥{{pagedata.item.price}})</a>
						</div>
						<div ng-if="pagedata.item.type==2">
							<a href="javascript:;" ng-click="access_json('jy_xiaoemerch/home/buyvip/')" class="jylabel jylabel-success">点击开通(VIP课程)</a>
						</div>
					</div>
				</div>
		</div>
		<div ng-if="!pagedata.item.noread && pagedata.item.videourl && (pagedata.item.type==0 || pagedata.item.type==3)" class="fui-picture">
				<video style="width:100%;max-height:16rem" ng-src="{{tomedia(pagedata.item.videourl)}}" poster="{{tomedia(pagedata.item.image)}}" x5-playsinline="" playsinline="" webkit-playsinline="" preload="auto"  preload="auto" controls loop="loop">
				</video>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem;margin-top:0">
			<div class="fui-cell sm">
				<div class="fui-cell-text">
				<div class="text bold">{{pagedata.item.title}}</div>
				<div class="subtitle" style="font-size:0.7rem">{{pagedata.item.desc}}</div>
				</div>
				<div class="fui-cell-remark noremark" style="padding-left:0;margin-top:0.1rem">
					<div class="fui-icon c">
						<div class="fui-tag" style="padding:0.2rem" >
							<i href="javascript:;" ng-click="pagedata.setlike();toogle(pagedata,'islike',[1,0])" ng-class="{'icon jinyunicon':1,'icon-follow':pagedata.islike !=1,'icon-xiai':pagedata.islike >0}" style="font-size:0.8rem"></i>
							<div class="subtitle">点赞</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="fui-cell-group">
			<div ng-if="pagedata.item.type==2 || pagedata.item.type==3" class="fui-cell">
				<div class="fui-cell-icon" style="margin-right:0.5rem">
					<i class="icon icon-xuexi1" style="font-size:1rem;color:#18bc9c"></i>
				</div>
				<div class="fui-cell-text">
					课程图集
				</div>
				<div class="fui-cell-remark noremark">
					<span href="javascript:" ng-click="access_json('/images//id='+pagedata.item.id)" class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">点击学习</span>
				</div>
			</div>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding:0.5rem">
				<div class="fui-tab-scroll">
					<div ng-class="{'item':1,'on':pagedata.showtype==0}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showtype=0">详情</a></div>
					<div ng-class="{'item':1,'on':pagedata.showtype==1}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showtype=1;pagedata.getlist(1)">同课课目</a></div>
					<div ng-class="{'item':1,'on':pagedata.showtype==2}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showtype=2">相关推荐</a></div>
					<div ng-class="{'item':1,'on':pagedata.showtype==3}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showtype=3;pagedata.getlist(3)">评价</a></div>
				</div>
				<div ng-if="pagedata.showtype==0 && !pagedata.item.noread" class="content-block content-images" style="margin-top:0.3rem;font-size:0.7rem" ng-bind-html="trust(pagedata.item.content)"></div>
				<div class="noread-btn" ng-if="pagedata.showtype==0 && pagedata.item.noread">
					<div ng-if="pagedata.item.type!=2" class="weui_cells" style="margin-top:0;">
						<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'noread_id':pagedata.item.noread_id,'noread_type':pagedata.item.noread_type},'jy_xiaoemerch/video_detail/pay/','jy_xiaoemerch/video_jieitem//id='+pagedata.item.id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.price}})</a>
						<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.price}})</a>
					</div>
					<div ng-if="pagedata.item.type==2" class="weui_cells" style="margin-top:0;">
						<a href="javascript:;" ng-click="access_json('jy_xiaoemerch/home/buyvip/')" class="weui_btn weui_btn_plain_primary">点击开通(VIP课程)</a>
					</div>
				</div>
				<div ng-if="pagedata.item.noread && pagedata.showtype==1 && pagedata.video.showtitle!=1" class="content-empty">
				  <i class="icon icon-mima" style="width: 6rem;margin-bottom: 0.5rem;font-size:1.6rem;"></i><br/><p style="color: #999;font-size: .75rem">购买后查看完整目录内容！</p>
				</div>
				<div ng-if="(!pagedata.item.noread || pagedata.video.showtitle==1) && pagedata.showtype==1" class="fui-cell-group" style="margin-top:0">
						<div class="fui-cell" ng-repeat="item in pagedata.list" ng-click="access_json('jy_xiaoemerch/video_jieitem//id='+item.id)">
							<div class="fui-cell-text">
								<div class="text">
									{{$index+1}}.{{item.title}} 
									<i ng-if="pagedata.item.noread" class="icon icon-mima syscolor" style="padding-left: 0.2rem;"></i>
								</div>
								<div class="subtitle" style="font-size:0.65rem">
									{{item.desc}} 
								</div>
								<div class="subtitle" style="font-size:0.65rem">
									{{item.createtime}} 
								</div>
							</div>
							<div class="fui-cell-remark"></div>
						</div>
						<div ng-if="!pagedata.loading && (!pagedata.list || pagedata.list.length<1)" class='content-empty' style="margin-top:0">
								<i class='icon icon-chakanpingjia' style="font-size:1.5rem"></i><br/>暂时没有任何课程
						</div>
				</div>
				<div ng-if="pagedata.showtype==2" style="margin-top:0.5rem;">
					<div ng-include="sys_html('_hots')"></div>
				</div>
				<div ng-if="pagedata.showtype==3" ng-include="sys_html('_msglist')"></div>
		</div>
		<div ng-include="sys_html('_copyright')"></div>
	</div>
</div>
<div class="fui-navbar" ng-if="pagedata.item.noread">
	<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'noread_id':pagedata.item.noread_id,'noread_type':pagedata.item.noread_type},'jy_xiaoemerch/video_detail/pay/','jy_xiaoemerch/video_jieitem//id='+pagedata.item.id)" class="weui_btn weui_btn_primary" style="border-radius:1rem;width:80%;margin-top:0.3rem">立即订阅</a>
	<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="weui_btn weui_btn_primary" style="border-radius:1rem;width:80%;margin-top:0.3rem">立即订阅</a>
</div>
<div class="fui-navbar" ng-if="!pagedata.item.noread">
	<a ng-if="pagedata.isshoucang!=1" href="javascript:;" ng-click="pagedata.shoucang()" class="weui_btn weui_btn_primary" style="border-radius:1rem;width:80%;margin-top:0.3rem">加入课程</a>
	<a ng-if="pagedata.isshoucang==1" href="javascript:;" ng-click="pagedata.showmsg=true" class="weui_btn weui_btn_primary" style="border-radius:1rem;width:80%;margin-top:0.3rem">评价</a>
</div>
<div ng-if="pagedata.showmsg" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showmsg=false"></i>
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">评价</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="100字以内" ng-model="pagedata.post.msg"></textarea>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a ng-click="pagedata.showmsg=false;post(pagedata.post,'/video_detail/setmsg/')" class="nav-item btn btn-success confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showmore" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="background:#f2f2f2;min-height:auto">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showmore=false"></i>
			<div class="fui-icon-group noborder col-4" style="padding:1rem 0.5rem;padding-top:2rem">
				<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_xiaoemerch/index/')">
					<div class="c radius" style="background:#fff;width:2.5rem;height:2.5rem;line-height:2.8rem;margin:auto">
						<i class="icon icon-shouye" style="font-size:1rem;color:#333"></i>
					</div>
					<div class="text" style="font-size:0.65rem;color: #666;margin-top:0.3rem">首页</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_xiaoemerch/home/')">
					<div class="c radius" style="background:#fff;width:2.5rem;height:2.5rem;line-height:2.8rem;margin:auto">
						<i class="icon icon-wo1" style="font-size:1rem;color:#333"></i>
					</div>
					<div class="text" style="font-size:0.65rem;color: #666;margin-top:0.3rem">个人中心</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_xiaoemerch/newsmsg/')">
					<div class="c radius" style="background:#fff;width:2.5rem;height:2.5rem;line-height:2.8rem;margin:auto">
						<i class="icon icon-pingjia3" style="font-size:1rem;color:#333"></i>
					</div>
					<div class="text" style="font-size:0.65rem;color: #666;margin-top:0.3rem">消息</div>
				</div>
				<div class="fui-icon-col-sm external" style="margin:0" ng-click="pagedata.shoucang()">
					<div class="c radius" style="background:#fff;width:2.5rem;height:2.5rem;line-height:2.8rem;margin:auto">
						<i class="icon icon-qiehuan" style="font-size:1rem;color:#333"></i>
					</div>
					<div class="text" style="font-size:0.65rem;color: #666;margin-top:0.3rem">{{pagedata.isshoucang==1?'移除':'收藏'}}</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="fe-floatright-bottom" style="bottom:3.5rem;z-index:988">
	<div class="icon" style="border-radius: 100%;padding:0.4rem;line-height:1;background-color: #fff; box-shadow:2px 2px 4px rgba(0,0,0,0.1);-webkit-box-shadow:2px 2px 4px rgba(0,0,0,0.1);-moz-box-shadow:2px 2px 4px rgba(0,0,0,0.1);" href="javascript:;" ng-click="pagedata.showmore=true">
		<i class="icon icon-all" style="font-size:1rem;"></i>
	</div>
</div>
<div ng-include="sys_html('_share')"></div>
<script>
scope.pagedata.getlist=function(showtype){
	var listurl='jy_xiaoemerch/video_jieitem/getlist/';
	if(showtype==3){
		listurl='jy_xiaoemerch/video_detail/getmsg/';
	}
	scope.tool.get_list(listurl,true);
}
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list(listurl);
}
//获取关注
scope.pagedata.setlike=function(){
	scope.post_json('jy_xiaoemerch/video_jieitem/like/',{'id':scope.pagedata.item.id},function(res){
			scope.message(res)
	});
}
scope.pagedata.shoucang=function(){
	scope.post_json('jy_xiaoemerch/video_detail/shoucang/',{'video_id':scope.pagedata.params.video_id},function(res){
		scope.pagedata.isshoucang=scope.pagedata.isshoucang==1?0:1;
		scope.message(res)
		scope.$evalAsync();
	});
}
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url);
		}
	});
}
scope.pagedata.pay=function(id){
	scope.post_json('jy_xiaoemerch/video_detail/twopay/',{'id':id},function(pay_id){
		scope.$evalAsync();
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_xiaoemerch/video_jieitem//id='+scope.pagedata.item.id);
				}else{
					scope.message('支付失败！','success','jy_xiaoemerch/video_jieitem//id='+scope.pagedata.item.id);
				}
		},'','','jy_xiaoemerch/video_jieitem//id='+scope.pagedata.item.id);
	});
}
</script>